package org.prem.springmvc.hello;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

@Controller
@RequestMapping("/hello")
public class HelloControllerAnnotation{
	
	@RequestMapping("/hellowelcome")
	public ModelAndView helloWorld(){
		ModelAndView modelAndView = new ModelAndView("HelloWelcome");
		modelAndView.addObject("msg", "hello world, welcome to tutorial");
		return modelAndView;
	}

	@RequestMapping("/hiwelcome")
	public ModelAndView hiWorld(){
		ModelAndView modelAndView = new ModelAndView("HelloWelcome");
		modelAndView.addObject("msg", "hi world");
		return modelAndView;
	}
}
